<template>
  <div class="player-info" id="player-info">
    <div class="info-panel">
      <router-link :to="{name: 'User', query: { sellerId: playInfo.sellerId}}">
        <span class="player-img">
          <img :src="playInfo.avatar" v-if="playInfo.avatar"/>
          <img src="../../assets/img/defaultImg.jpeg" v-else/>
        </span>
      </router-link>
      <div class="info-panel-right" ontouchstart="return false;">
        <p class="player-name">{{playInfo.nickname}}</p>
        <p class="player-city" style="margin-top:0.3rem;"><i class="icon"></i><span>&nbsp;{{address}}</span></p>
      </div>
    </div>
    <div class="close" @click="goto"><img src="../../assets/img/icon_closed.png"/></div>
  </div>
</template>

<script>
  export default {
    data () {
      return {
      }
    },
    components: {
    },
    props: {
      playInfo: {
        type: Object,
        default: function () {
          return {}
        }
      },
      routeName: {
        type: String,
        default: 'List'
      },
      address: {
        type: String,
        default: ''
      },
      route: {
        type: String,
        default: ''
      }
    },
    computed: {},
    beforeMount(){

    },
    mounted(){
      console.log(this.routeName);
      if(window.sys == "Android"){
          $("#player-info").css("padding-top","11%");
      }
    },
    activated(){

    },
    methods: {
      goto() {
        // 首页
        if(this.routeName === 'List'){
           window.location.href= window.indexUrl;
        }else{
          this.$router.push({name: this.routeName})
        }
      }

    }
  }
</script>

<!--<script src="//imgcache.qq.com/open/qcloud/video/vcplayer/TcPlayer.js" charset="utf-8"></script>-->

<style lang="scss"></style>
